<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
<script src="js/axios-0.18.0.js" type="text/javascript" charset="utf-8"></script>
<body>
<div id="app">
    <form action="/exam_project/upload?type=up" method="post" enctype="multipart/form-data">
        头像<input type="file" name="pic">

        <input type="submit" value="提交">
    </form>
    <img :src="img">
</div>
<script>

    new Vue({
        el: "#app",
        data: {
           img:"img/man00.jpg"
        },
        mounted() {//网页加载完后的回调
            var _this=this;
            // 页面加载完成后，发送异步请求，查询数据
            axios({
                method: "get",
                url: "http://localhost:8080//exam_project/upload?type=down"
            }).then(function(resp) {
                _this.img = resp.data;
            })
        }
    })
</script>
</body>
</html>